<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>New LiquidCrystal library: SI2CIO Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">New LiquidCrystal library
   &#160;<span id="projectnumber">1.3.2</span>
   </div>
   <div id="projectbrief">Generic LCD control library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_s_i2_c_i_o-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SI2CIO Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae27c1861e885c6ade3f3923658957edf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#ae27c1861e885c6ade3f3923658957edf">SI2CIO</a> ()</td></tr>
<tr class="separator:ae27c1861e885c6ade3f3923658957edf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef6df8409b67bda118c2e055af3d6f47"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#aef6df8409b67bda118c2e055af3d6f47">begin</a> (uint8_t i2cAddr)</td></tr>
<tr class="separator:aef6df8409b67bda118c2e055af3d6f47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ef4fb77ddd3d248be5e0898e33430a3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#a4ef4fb77ddd3d248be5e0898e33430a3">pinMode</a> (uint8_t pin, uint8_t dir)</td></tr>
<tr class="separator:a4ef4fb77ddd3d248be5e0898e33430a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e78ee0ee2d1bb12136b5c5a3487512b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#a8e78ee0ee2d1bb12136b5c5a3487512b">portMode</a> (uint8_t dir)</td></tr>
<tr class="separator:a8e78ee0ee2d1bb12136b5c5a3487512b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32cb72361397c1051ee650dbb2190060"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#a32cb72361397c1051ee650dbb2190060">read</a> (void)</td></tr>
<tr class="separator:a32cb72361397c1051ee650dbb2190060"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15fe6d174fb001bca7866004e96f0b33"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#a15fe6d174fb001bca7866004e96f0b33">digitalRead</a> (uint8_t pin)</td></tr>
<tr class="separator:a15fe6d174fb001bca7866004e96f0b33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47c3ac3198cddcf9e6da1ccacd9db5d9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#a47c3ac3198cddcf9e6da1ccacd9db5d9">write</a> (uint8_t value)</td></tr>
<tr class="separator:a47c3ac3198cddcf9e6da1ccacd9db5d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1e3c6fd22872f248de6a90af27d92de"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_i2_c_i_o.html#ae1e3c6fd22872f248de6a90af27d92de">digitalWrite</a> (uint8_t pin, uint8_t level)</td></tr>
<tr class="separator:ae1e3c6fd22872f248de6a90af27d92de"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae27c1861e885c6ade3f3923658957edf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SI2CIO::SI2CIO </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor method  Class constructor constructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aef6df8409b67bda118c2e055af3d6f47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SI2CIO::begin </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>i2cAddr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes the device.  This method initializes the device allocating an I2C address. This method is the first method that should be call prior to calling any other method form this class. On initialization all pins are configured as INPUT on the device.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i2cAddr</td><td>I2C Address where the device is located. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the device was initialized correctly, 0 otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a15fe6d174fb001bca7866004e96f0b33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t SI2CIO::digitalRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read a pin from the device.  Reads a particular pin from the device. To read a particular pin it has to be configured as INPUT. During initialization all pins are configured as INPUTs by default. Please refer to pinMode or portMode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin[in]</td><td>Pin from the port to read its status. Range (0..7) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the pin status (HIGH, LOW) if the pin is configured as an output, reading its value will always return LOW regardless of its real state. </dd></dl>

</div>
</div>
<a class="anchor" id="ae1e3c6fd22872f248de6a90af27d92de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SI2CIO::digitalWrite </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes a digital level to a particular pin.  Write a level to the indicated pin of the device. For this method to have effect, the pin has to be configured as OUTPUT using the pinMode or portMode methods.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin[in]</td><td>device pin to change level. Range (0..7).  level[in] logic level to set the pin at (HIGH, LOW). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 on success, 0 otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a4ef4fb77ddd3d248be5e0898e33430a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI2CIO::pinMode </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dir</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the mode of a particular pin.  Sets the mode of a particular pin to INPUT, OUTPUT. digitalWrite has no effect on pins which are not declared as output.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin[in]</td><td>Pin from the I2C IO expander to be configured. Range 0..7 </td></tr>
    <tr><td class="paramname">dir[in]</td><td>Pin direction (INPUT, OUTPUT). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8e78ee0ee2d1bb12136b5c5a3487512b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI2CIO::portMode </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets all the pins of the device in a particular direction.  This method sets all the pins of the device in a particular direction. This method is useful to set all the pins of the device to be either inputs or outputs. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dir[in]</td><td>Direction of all the pins of the device (INPUT, OUTPUT). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a32cb72361397c1051ee650dbb2190060"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t SI2CIO::read </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reads all the pins of the device that are configured as INPUT.  Reads from the device the status of the pins that are configured as INPUT. During initialization all pins are configured as INPUTs by default. Please refer to pinMode or portMode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a47c3ac3198cddcf9e6da1ccacd9db5d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SI2CIO::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write a value to the device.  Writes to a set of pins in the device. The value is the binary representation of all the pins in device. The value written is masked with the configuration of the direction of the pins; to change the state of a particular pin with this method, such pin has to be configured as OUTPUT using the portMode or pinMode methods. If no pins have been configured as OUTPUTs this method will have no effect.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value[in]</td><td>value to be written to the device. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 on success, 0 otherwise </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Users/fmalpartida/Documents/development/mercurial repos/SW/NewliquidCrystal/<a class="el" href="_s_i2_c_i_o_8h_source.html">SI2CIO.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
